import React, {Component} from 'react';
import './poop.scss'
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";

class Poop extends Component {
    render() {
        return (
            <div className={'poop'} onClick={() => this.props.poopHandle(false)}>
                <div className="main">
                    <div className="search">
                        {this.props.type === 'searching' &&
                        <div className="searching">
                            <i className={'act'}><FontAwesomeIcon icon="clock"/></i>
                            <p>正在寻找</p>
                        </div>}
                        {this.props.type === 'search' &&
                        <div className="cog">
                            <i className={'act'}><FontAwesomeIcon icon="cog"/></i>
                            <p>正在安装</p>
                        </div>}
                        {this.props.type === 'searched' &&
                        <div className="searched">
                            <i><FontAwesomeIcon icon="search"/></i>
                            <p>未找到相关插件</p>
                        </div>}
                        {this.props.type === 'searcher' &&
                        <div className="searcher">
                            <i><FontAwesomeIcon icon="check"/></i>
                            <p>安装完成</p>
                        </div>}
                        {this.props.type === 'searchCheck' &&
                        <div className="searchCheck">
                            <i><FontAwesomeIcon icon="check"/></i>
                            <p>模块已存在</p>
                        </div>}
                    </div>
                </div>
            </div>
        );
    }
}

export default Poop;